package org.piggy.test.dubbo.service.impl;

import com.alibaba.fastjson2.JSONObject;
import org.apache.dubbo.config.annotation.DubboService;
import org.piggy.client.core.ApiInvoker;
import org.piggy.client.core.ApiProtocol;
import org.piggy.client.core.ApiService;
import org.piggy.test.dubbo.function.DubboInterface;


@DubboService(version = "2.0.0")
@ApiService(serviceId = "gateway-test-dubbo-001", protocol = ApiProtocol.DUBBO, version = "2.0.0")
public class DubboInterfaceSecondImpl implements DubboInterface {

    @Override
    @ApiInvoker(path = "/dubbo-demo/second1")
    public String dubbo1() {
        return "Hello version:2.0.0 second1";
    }

    @Override
    @ApiInvoker(path = "/dubbo-demo/second2")
    public String dubbo2(JSONObject msg) {
        return "Hello version:1.0.0 second2 -> "+ msg;
    }

}
